About Task Processing in Open Transport
If you are writing an application, the Open Transport system task and deferred task functions are optional. You don't need the system task functions because your code executes within a normal event loop, referred to as system task time, so you can call Open Transport functions as part of your application's normal processing. You don't need the deferred task functions because when you execute your Open Transport code asynchronously, much of the processing takes place in the notifier functions, which can call Open Transport functions because notifiers execute at deferred task time.However, you may wish to use the Open Transport system task functions for some of your application's processing because the Open Transport functions provide an efficient way to streamline your main event loop. For example, you can avoid the complication of handling some of your memory allocation during your main event loop; instead, you can schedule a system task to obtain memory at certain times or on a periodic basis.
If you are writing code that isn't an application (for example, a system extension or a code resource), you probably need to use the system and deferred task functions available in Open Transport to get processing time to handle such tasks as allocating memory or accessing disk space.
If you currently use interrupts in your code or if you want to call Open Transport from within an interrupt function such as a Time Manager, or Vertical Retrace Manager function, you must use the Open Transport deferred task functions to handle the task as a deferred task.
Open Transport provides several functions to make it easy for you to defer your interrupt operations to deferred task time. The Open Transport deferred task functions provide an alternative to the Deferred Task Manager
DTInstall
function. Using the Open Transport higher-level deferred task functions instead of theDTInstall
function allows OpenTransport to adapt to changes in the underlying operating system without affecting the client's code.